//
// Created by yearing on 2021/6/21.
//

#include "iostream"

using namespace std;

template<unsigned int n>
struct Fibonacci {
    enum {
        value = Fibonacci<n - 1>::value + Fibonacci<n - 2>::value
    };
};
template<>
struct Fibonacci<0> {
    enum {
        value = 0
    };
};
template<>
struct Fibonacci<1> {
    enum {
        value = 1
    };
};

int main() {
    cout << Fibonacci<3>::value << endl;
    cout << Fibonacci<30>::value << endl;
    return 0;
}